package com.tan.domain.vo;

/**
 * @author tlj
 * @date 2022/01/24 11:01:05
 */

public enum Week {
    MONDAY(0, "星期一"),
    TUESDAY(1, "星期二"),
    WEDNESDAY(2, "星期三"),
    THURSDAY(3, "星期四"),
    FRIDAY(4, "星期五"),
    SATURDAY(5, "星期六"),
    SUNDAY(6, "星期日");

    private int num;
    private String desc;

    Week(int num, String desc) {
        this.num = num;
        this.desc = desc;
    }

    public String getDesc() {
        return desc;
    }

    public int getNum() {
        return num;
    }

    @Override
    public String toString() {
        switch (this) {
            case MONDAY:
                return "星期一";
            case TUESDAY:
                return "xingqier";
            case WEDNESDAY:
                return "星期三";
            case THURSDAY:
                return "星期四";
            case FRIDAY:
                return "星期五";
            case SATURDAY:
                return "星期六";
            case SUNDAY:
                return "星期日";
            default:
                return "Unknown Day";
        }
    }

    public static void main(String[] args) {
        Week[] weeks = Week.values();
        for (Week day : weeks) {
            System.out.println("name:"+ day.name()+","+"desc:"+day.getDesc()+","+day.num);
        }
    }
}
